﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using PJ.DBModel.Models;
using System;
using System.Collections.Generic;
using System.Text;

namespace PJ.DBModel.Mappings
{
    public class ItemsdetailMap : IEntityTypeConfiguration<Itemsdetail>
    {
        public void Configure(EntityTypeBuilder<Itemsdetail> builder)
        {
            builder.ToTable("itemsdetail");

            builder.HasComment("字典明细表");

            builder.Property(e => e.Id).HasComment("主键");

            builder.Property(e => e.CreateTime).HasComment("创建时间");

            builder.Property(e => e.CreateUserId).HasComment("创建用户主键");

            builder.Property(e => e.ItemCode)
                .HasMaxLength(50)
                .HasComment("编码");

            builder.Property(e => e.ItemId).HasComment("主表主键");

            builder.Property(e => e.ItemName)
                .HasMaxLength(50)
                .HasComment("名称");

            builder.Property(e => e.SortCode).HasComment("排序码");

            builder.Property(e => e.UpdateTime).HasComment("修改时间");

            builder.Property(e => e.UpdateUserId).HasComment("修改用户主键");
        }
    }
}
